package com.example.game.hff;

import java.awt.Graphics;
import java.awt.Image;

public class Army implements Constants {
	
	private Image image;
	private int x, y;
	private boolean active;
	
	public Army(Image image) {
		this.image = image;
		
		x = -256;
//		for (int i = 0; i < 3; i++) {
//		   y = ((int)(Math.random() * i) * 100) + 50;
//		}
		y = 250;
		active = true;
		
	}
	
	public void draw(Graphics g) {
		g.drawImage(image, x, y, null);
	}
	
	public void update() {
		x += 15;
		if (x > 1456) {
			active = false;
		}
	}

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}
	
	public int getWidth() {
		return image.getWidth(null);
	}
	
	public int getHeight() {
		return image.getHeight(null);
	}
	

}
